Commit graph

17 commits

Author SHA1 Message Date
Ayrat Badykov 32b12182e0
Set task_type when starting a worker pool (#64) (#66)
* Set task_type when starting a worker pool (#64)

* make queue fields public

* Set task_type when starting a worker pool

* make fields private again

* bump version
2022-08-16 13:25:19 +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 549f5a1c4b
Max number of conns (#54)
* Max number of conns

* fixing builder , connect and example

* fix comments

* fix comments

* Update src/asynk/async_queue.rs

Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
2022-08-01 19:37:32 +00:00
Pmarquez 7e66196373
Async Improvements AsyncRunnable param (#51)
* AsyncRunnable param in insert_task and insert_periodic_task

* fix example
2022-07-31 15:15:00 +00:00
Ayrat Badykov 133d142761
Async worker pool draft (#49)
* Async worker pool draft

* ignore all targets

* simple worker example

* add debug logs

* fix

* fix tests

* remove log

* remove debug logs

* fix clippy
2022-07-31 13:32:37 +00:00
Pmarquez 6222c15d99
Async scheduled tasks (#47)
* preparing queries for periodic tasks

* fixing clippy and some other things

* delete src/schema

* ignoring src/schema.rs

* fix compile error

* fix clippy

* Scheduler

* Scheduler done ??

* improve scheduler (#48)

* improve scheduler

* add number of restarts

* fix clippy

* add into attribute

* make number of restarts pub

* fixing bugs and start async scheduler tests

* fixing insert periodic task bug and scheduler tests bug

* fix clippy

* fix clippy tests

* fix clippy tests again

* fix task type :D

* Builder AsyncQueueTest and sleep in start

Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
2022-07-31 11:40:24 +00:00
Pmarquez 2d724c3776
Async worker test (#46)
* preparing code to tests

* changing queue tests and starting worker tests with new struct AsyncQueueTest

* fix clippy and delete Debug trait

* fix warnings

* Get task by id in worker tests and AsyncQueueTest #[cfg(test)]

* Defaults and AsyncWorker Builder

* Testing :D

* Execute task specific type

* deleting Options and comment

* insert task is back git !!

* Test remove tasks and changing insert task auxiliar func
2022-07-27 17:05:05 +00:00
Pmarquez 8d0a23e2f9
Async Worker (#44)
* stating with async worker

* async sleep solve and update state test

* uncomenting line

* retention mode and sleep params in lib.rs

* fixing code style

* trying to solve

* dont like changes

* Add AsyncQueueable trait (#45)

* add trait

* update runnable trait

* fix test

Co-authored-by: Ayrat Badykov <ayratin555@gmail.com>
2022-07-23 17:24:22 +03:00
Pmarquez d3805cd562
Returning fail task (#35)
* fail task returning

* fix clippy

* state check
2022-07-20 15:26:11 +00:00
Pmarquez f56792a558
Returning Insert query (#34)
* insert query return task

* deleting schema
2022-07-20 14:27:01 +00:00
Ayrat Badykov 8f6f905fe9
Use transaction in all queries (#33)
* Use transaction in all queries

* fix clippy
2022-07-20 10:01:33 +00:00
Ayrat Badykov 3602097fb6
fetch_task static and AsyncQueue method (#32)
* fetch and touch a task inside of db transaction

* remove transaction from AsyncQueue

* fix `fetch_and_touch` test

* uncomment one more test
2022-07-19 20:05:09 +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
Pmarquez a60eb08fa6
fang_tasks queries done (#24)
* fang_tasks queries done

* queries with transaction rollback

* deleting unused imports

* some tests

* deleting schema , deleting feature section , updated_at corrected

* rollback and commit methods and execute modified

* transaction empty message

* fix cargo clippy
2022-07-18 10:44:05 +00:00
Ayrat Badykov d186a5434c
allow to use transaction to be able to rollback in tests 2022-07-17 22:34:55 +03:00
Ayrat Badykov c2c83d1031
async insert task query (#23)
* async insert task query

* return the number of rows
2022-07-17 19:22:00 +03:00
Ayrat Badykov a707ce2f5c
start working on async queries 2022-07-17 10:13:45 +03:00