617bd71bd1
Update readme with execution diagram
2023-03-18 16:26:12 +01:00
aa1144e54f
Allow definition of custom error type
2023-03-13 17:46:59 +01:00
c99486eaa6
Make TaskStore trait object safe
2023-03-13 13:08:54 +01:00
10e01390b8
Allow customization of the pulling interval per queue
2023-03-12 17:15:40 +01:00
2964dc2b88
Wait all workers to stop gracefully
2023-03-12 00:18:15 +01:00
936aac17a7
Update readme
2023-03-11 22:23:45 +01:00
4895400d33
Update readme
2023-03-11 22:22:25 +01:00
7fcb63f75c
Update readme
2023-03-09 19:12:50 +01:00
6ed9513baf
Update readme with backie info
2023-03-07 17:52:26 +01:00
c1fcc87885
Revamp project using newtype and rework tasks table
2023-03-07 16:41:20 +01:00
ada981865d
Update readme
2023-03-04 20:52:22 +01:00
234f5afe69
Frango 🐓
2023-03-04 20:51:21 +01:00
18303be796
Make workers go brrrr...
2023-03-04 20:46:09 +01:00
0be173ef02
Support only async
2023-03-04 19:07:17 +01:00
Ayrat Badykov
9b92a4a34e
Start documenting the project ( #96 )
...
* Start documenting the project
* Add AsyncQueue implementation
* Documenting Async runnable
* By default value in uniq function
* Fix errors and warnings async runnable docs
* Update src/asynk/async_queue.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_queue.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_queue.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_queue.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_queue.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_runnable.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_runnable.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_runnable.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_runnable.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_runnable.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* format something
* Update src/asynk/async_queue.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_queue.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_queue.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_queue.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_queue.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_queue.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_queue.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_queue.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_queue.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_queue.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_queue.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_queue.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_queue.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_queue.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_runnable.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_runnable.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_runnable.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_runnable.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_runnable.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_runnable.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_runnable.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_runnable.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_runnable.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* uniq documentation
* Update src/asynk/async_runnable.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_queue.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_queue.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_queue.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_queue.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_runnable.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update src/asynk/async_runnable.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
Co-authored-by: pxp9 <pepe.marquezromero@gmail.com>
Co-authored-by: Pmarquez <48651252+pxp9@users.noreply.github.com>
2022-10-18 08:30:17 +02:00
Ayrat Badykov
1373bf6523
release 0.10 ( #103 )
...
* update the version to 0.10
* fix readme
* improve changelog entry
2022-09-27 17:59:37 +03:00
Ayrat Badykov
11a7dcc41e
update readme ( #95 )
2022-09-25 16:05:27 +03:00
Pmarquez
d3fc479b68
Docs improvement ( #80 )
...
* I little bit improve docs
* README
* disable tests for docs
2022-09-03 14:05:58 +03:00
Pmarquez
7fb4423bf5
update README and CHANGELOG, bump version ( #79 )
...
* README and CHANGELOG
* FUNDING
* bump version
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
2022-09-03 11:27:03 +03:00
Pmarquez
691cba40d4
Weather bot example ( #68 )
...
* Weather bot example
* my bad xd
2022-08-18 14:59:58 +00:00
Ayrat Badykov
8eaf4e6786
bump version
2022-08-18 14:45:28 +03:00
Pmarquez
1dc513c4a7
Sleep with Duration ( #67 )
...
* Sleep in millis
* SleepParams Duration :D
* Readme updated!
* Changing Schedule and SleepParams to std::time::Duration
* Millis period in Periodic tasks
* Readme!
* Error management
* period_in_millis i64
* fix clippy
2022-08-18 14:39:10 +03:00
Ayrat Badykov
2bf660c9ee
fix Error struct export for asynk
( #61 )
...
* fix Error struct export for `asynk`
* fix imports in tests
* bump version
2022-08-05 10:06:32 +03:00
Pmarquez
3f8b189f90
README improvements ( #60 )
...
improvements
2022-08-04 17:11:58 +00:00
Pmarquez
179af40899
Changelog , Readme , cargo.toml ( #59 )
...
* Changelog , Readme , cargo.toml
* Update CHANGELOG.md
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* Update CHANGELOG.md
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
* delete one
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
2022-08-04 16:47:17 +00:00
Pmarquez
cf2ce19c97
Handle imports and dependencies ( #56 )
...
* imports, exports and README
* serde_json not necessay
* deleting tokio_postgres
* authors
* blocking example
* Update fang_examples/simple_async_worker/src/lib.rs
Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
2022-08-03 08:37:53 +00:00
Pmarquez
abe324fc57
Fetch task ( #26 )
...
* fetch task async and renaming every Job/job to Task/task
* fixing cargo clippy
* Task instead Job in readme
* change one task because if not test will fail, redefined all tasks structs
* derive feature
* deleting schema
* changing query
* task builder
* fix bug enum fang task state
* fetch_test based on metadata, good improve testing fetch_task
* deleting toSql FromSql derives that are useless for Task
* builders and fail_task change
2022-07-19 13:49:43 +00:00
Ayrat Badykov
3bb45022d9
update typetag
( #19 )
...
* update `typetag`
typetage now requires rust 1.62
* stable rust
* disable extra-unused-lifetimes
the warning originates from diesel macro
* fix warning name
2022-07-01 09:03:27 +03:00
Ayrat Badykov
a74d943896
fix shutdown test and add changelog entry
2021-12-05 08:43:17 +02:00
J
0473978460
Support graceful shutdown of worker ( #14 )
...
* Include shared state to allow graceful shutdown
Graceful shutdown of executors allows the current task to finish before
exiting. This prevents half completed tasks in the general case: when
workers are being scaled down.
To accomplish this a shared state (using an `Arc<RwLock<WorkerState>>`)
is created in a WorkerPool on instantiation. This shared state is then
passed to each thread (spawned with `WorkerThread::spawn_in_pool`), and
finally passed to the `Executor` instantiated by the `WorkerThread`.
This allows the infinit loop in the executor to receive signals from the
`WorkerPool`, and exit gracefully when requested.
* Add basic error handling
Add `FangError` enum derived from `thiserror::Error`. This should be the
default the error type for the Fang library, all errors returned by Fang
should be a value in this enum.
Use FangError for errors returned by start and shutdown, remove unwraps.
* Include instructions for running tests locally
* Track handles of panic'd worker threads
Allows the Drop trait impl of ThreadWorker to access the
`thread_join_handles` of WorkerPool so it can update the thread handle
when the previous thread unexpectedly exited and a new one is being
started. This is done in a way that prevents data leaks (by using a
Hashmap keyed off the name of the worker thread). It also ensures that
threads started from the Drop impl are properly joined on shutdown.
* Fix WorkerThread drop implementation
WorkerThread can not have `Clone` derived on it, as each cloned copy
will try to restart the thread when it's dropped, leading to an infinite
number of thread spawns till stack overflow. Oops
* Remove Option from SharedState type declaration
Instead of having an Option wrapping an enum, have the option codified
as a state in the enum.
* Bump version to 0.5.0
* Add integration test for shutdown
* Update simple_worker example to include signal monitoring and shutdown
* Update readme to mention using signal-hook to gracefully shutdown worker
2021-12-05 08:19:08 +02:00
Ayrat Badykov
78f27eac3d
bump version to 0.4.1
2021-08-22 21:29:27 +03:00
Ayrat Badykov
d166313cab
add a note about El Monitorro
2021-08-18 22:09:49 +03:00
Ayrat Badykov
1aabb91206
bump version to 0.4.0 ( #10 )
...
* update readme
* remove note
* add CHANGELOG
* fix pr number
2021-07-31 10:40:11 +03:00
Ayrat Badykov
824e32f17b
pass PgConnection into run function ( #8 )
...
* pass PgConnection into run function
Changes:
- rename Postgres into Queue
- pass PgConnection into run function
* remove all tasks of specific type
* add pgconnection
* pass connection to every queue function
* add connection pool
* reuse connection in test
* update readme
2021-07-25 15:20:16 +03:00
Ayrat Badykov
cb02a03fea
bump version
2021-07-24 12:31:26 +03:00
Ayrat Badykov
7d92fd2d6a
Update Readme ( #7 )
...
* Update Readme
* change migration path in the readme
2021-07-24 12:13:59 +03:00
Ayrat Badykov
df1da87e13
bump version and add badges
2021-07-11 13:55:52 +03:00
Ayrat Badykov
4f50385c96
simplify usage by re-exporting serde traits ( #3 )
...
* simplify usage by re-exporting serde traits
* improve readme formatting
* use typetag
* try different approach
* reexport through macro
* fix re-exporting
* add CHANGELOG entry
* use typetag::serde in README
2021-07-11 10:26:20 +03:00
Ayrat Badykov
36e705a7ef
update README and bump version
2021-07-04 09:09:56 +03:00
Ayrat Badykov
c601984d37
prepare to publish on crates.io
2021-06-24 13:17:11 +03:00
Ayrat Badykov
917c65204b
add README
2021-06-24 12:58:02 +03:00