-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d660075
Showing
26 changed files
with
3,867 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** @type {import("eslint").Linter.Config} */ | ||
const config = { | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint'], | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended-type-checked', | ||
'plugin:@typescript-eslint/stylistic-type-checked', | ||
], | ||
rules: { | ||
quotes: ['error', 'single'], | ||
'@typescript-eslint/array-type': 'off', | ||
'@typescript-eslint/consistent-type-definitions': 'off', | ||
'@typescript-eslint/consistent-type-imports': [ | ||
'warn', | ||
{ | ||
prefer: 'type-imports', | ||
fixStyle: 'inline-type-imports', | ||
}, | ||
], | ||
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }], | ||
}, | ||
}; | ||
|
||
module.exports = config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# dependencies | ||
/node_modules | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
/dist | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.pnpm-debug.log* | ||
|
||
# local env files | ||
.env | ||
.env*.local | ||
|
||
# typescript | ||
*.tsbuildinfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
WakaQ is written and maintained by Alan Hamlett and various contributors: | ||
|
||
Development Lead | ||
---------------- | ||
|
||
- Alan Hamlett <alan.hamlett@gmail.com> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,234 @@ | ||
# CHANGES | ||
|
||
## 2.1.0 (2023-09-22) [commits](https://github.com/wakatime/wakaq/compare/2.0.2...2.1.0) | ||
|
||
#### Feature | ||
|
||
- Include number of workers connected when inspecting queues. | ||
- Log queue params on startup. | ||
|
||
#### Misc | ||
|
||
- Improve docs in readme. | ||
|
||
## 2.0.2 (2022-12-09) [commits](https://github.com/wakatime/wakaq/compare/2.0.1...2.0.2) | ||
|
||
#### Bugfix | ||
|
||
- Make sure to catch system exceptions to prevent worker infinite loops. | ||
|
||
## 2.0.1 (2022-12-09) [commits](https://github.com/wakatime/wakaq/compare/2.0.0...2.0.1) | ||
|
||
#### Bugfix | ||
|
||
- Always catch SoftTimeout even when nested in exception context. | ||
|
||
## 2.0.0 (2022-11-18) [commits](https://github.com/wakatime/wakaq/compare/1.2.0...2.0.0) | ||
|
||
#### Feature | ||
|
||
- Support bytes in task arguments. | ||
|
||
#### Misc | ||
|
||
- Tasks always receive datetimes in UTC without tzinfo. | ||
|
||
## 1.3.0 (2022-10-05) [commits](https://github.com/wakatime/wakaq/compare/1.2.1...1.3.0) | ||
|
||
#### Feature | ||
|
||
- Add username, password, and db redis connection options. | ||
[#6](https://github.com/wakatime/wakaq/issues/6) | ||
|
||
## 1.2.1 (2022-09-20) [commits](https://github.com/wakatime/wakaq/compare/1.2.0...1.2.1) | ||
|
||
#### Bugfix | ||
|
||
- Prevent reading from Redis when no queues defined. | ||
|
||
#### Misc | ||
|
||
- Improve error message when app path not WakaQ instance. | ||
|
||
## 1.2.0 (2022-09-17) [commits](https://github.com/wakatime/wakaq/compare/1.1.8...1.2.0) | ||
|
||
#### Feature | ||
|
||
- Util functions to peek at tasks in queues. | ||
|
||
## 1.1.8 (2022-09-15) [commits](https://github.com/wakatime/wakaq/compare/1.1.7...1.1.8) | ||
|
||
#### Bugfix | ||
|
||
- Ignore SoftTimeout in child when not processing any task. | ||
|
||
## 1.1.7 (2022-09-15) [commits](https://github.com/wakatime/wakaq/compare/1.1.6...1.1.7) | ||
|
||
#### Bugfix | ||
|
||
- Allow custom timeouts defined on task decorator. | ||
|
||
## 1.1.6 (2022-09-15) [commits](https://github.com/wakatime/wakaq/compare/1.1.5...1.1.6) | ||
|
||
#### Bugfix | ||
|
||
- All timeouts should accept timedelta or int seconds. | ||
|
||
## 1.1.5 (2022-09-15) [commits](https://github.com/wakatime/wakaq/compare/1.1.4...1.1.5) | ||
|
||
#### Bugfix | ||
|
||
- Fix typo. | ||
|
||
## 1.1.4 (2022-09-15) [commits](https://github.com/wakatime/wakaq/compare/1.1.3...1.1.4) | ||
|
||
#### Bugfix | ||
|
||
- Fix setting task and queue on child from ping. | ||
|
||
## 1.1.3 (2022-09-15) [commits](https://github.com/wakatime/wakaq/compare/1.1.2...1.1.3) | ||
|
||
#### Bugfix | ||
|
||
- Fix sending task and queue to parent process. | ||
|
||
## 1.1.2 (2022-09-14) [commits](https://github.com/wakatime/wakaq/compare/1.1.1...1.1.2) | ||
|
||
#### Bugfix | ||
|
||
- Fix getattr. | ||
|
||
## 1.1.1 (2022-09-14) [commits](https://github.com/wakatime/wakaq/compare/1.1.0...1.1.1) | ||
|
||
#### Bugfix | ||
|
||
- Add missing child timeout class attributes. | ||
|
||
## 1.1.0 (2022-09-14) [commits](https://github.com/wakatime/wakaq/compare/1.0.6...1.1.0) | ||
|
||
#### Feature | ||
|
||
- Ability to overwrite timeouts per task or queue. | ||
|
||
## 1.0.6 (2022-09-08) [commits](https://github.com/wakatime/wakaq/compare/1.0.5...1.0.6) | ||
|
||
#### Bugfix | ||
|
||
- Prevent unknown task crashing worker process. | ||
|
||
## 1.0.5 (2022-09-08) [commits](https://github.com/wakatime/wakaq/compare/1.0.4...1.0.5) | ||
|
||
#### Bugfix | ||
|
||
- Make sure logging has current task set. | ||
|
||
## 1.0.4 (2022-09-07) [commits](https://github.com/wakatime/wakaq/compare/1.0.3...1.0.4) | ||
|
||
#### Bugfix | ||
|
||
- Fix auto retrying tasks on soft timeout. | ||
|
||
## 1.0.3 (2022-09-07) [commits](https://github.com/wakatime/wakaq/compare/1.0.2...1.0.3) | ||
|
||
#### Bugfix | ||
|
||
- Ignore SoftTimeout when waiting on BLPOP from Redis list. | ||
|
||
## 1.0.2 (2022-09-05) [commits](https://github.com/wakatime/wakaq/compare/1.0.1...1.0.2) | ||
|
||
#### Bugfix | ||
|
||
- Ping parent before blocking dequeue in case wait timeout is near soft timeout. | ||
|
||
## 1.0.1 (2022-09-05) [commits](https://github.com/wakatime/wakaq/compare/1.0.0...1.0.1) | ||
|
||
#### Bugfix | ||
|
||
- All logger vars should be strings. | ||
|
||
## 1.0.0 (2022-09-05) [commits](https://github.com/wakatime/wakaq/compare/0.0.11...1.0.0) | ||
|
||
- First major release. | ||
|
||
## 0.0.11 (2022-09-05) [commits](https://github.com/wakatime/wakaq/compare/0.0.10...0.0.11) | ||
|
||
#### Feature | ||
|
||
- Add task payload to logger variables. | ||
|
||
## 0.0.10 (2022-09-05) [commits](https://github.com/wakatime/wakaq/compare/0.0.9...0.0.10) | ||
|
||
#### Bugfix | ||
|
||
- Prevent logging error from crashing parent process. | ||
|
||
## 0.0.9 (2022-09-05) [commits](https://github.com/wakatime/wakaq/compare/0.0.8...0.0.9) | ||
|
||
#### Bugfix | ||
|
||
- Prevent parent process looping forever while stopping children. | ||
|
||
## 0.0.8 (2022-09-05) [commits](https://github.com/wakatime/wakaq/compare/0.0.7...0.0.8) | ||
|
||
#### Bugfix | ||
|
||
- Prevent parent process crash leaving zombie child processes. | ||
|
||
## 0.0.7 (2022-09-05) [commits](https://github.com/wakatime/wakaq/compare/0.0.6...0.0.7) | ||
|
||
#### Feature | ||
|
||
- Ability to retry tasks when they soft timeout. | ||
|
||
#### Bugfix | ||
|
||
- Ping parent process at start of task to make sure soft timeout timer is reset. | ||
|
||
## 0.0.6 (2022-09-03) [commits](https://github.com/wakatime/wakaq/compare/0.0.5...0.0.6) | ||
|
||
#### Feature | ||
|
||
- Implement exclude_queues option. | ||
|
||
#### Bugfix | ||
|
||
- Prevent parent process crash if write to child broadcast pipe fails. | ||
|
||
## 0.0.5 (2022-09-01) [commits](https://github.com/wakatime/wakaq/compare/0.0.4...0.0.5) | ||
|
||
#### Bugfix | ||
|
||
- Run broadcast tasks once per worker instead of randomly. | ||
|
||
## 0.0.4 (2022-09-01) [commits](https://github.com/wakatime/wakaq/compare/0.0.3...0.0.4) | ||
|
||
#### Feature | ||
|
||
- Allow defining schedules as tuple of cron and task name, without args. | ||
|
||
## 0.0.3 (2022-09-01) [commits](https://github.com/wakatime/wakaq/compare/0.0.2...0.0.3) | ||
|
||
#### Bugfix | ||
|
||
- Prevent worker process crashing on any exception. | ||
|
||
#### Feature | ||
|
||
- Ability to wrap tasks with custom dectorator function. | ||
|
||
## 0.0.2 (2022-09-01) [commits](https://github.com/wakatime/wakaq/compare/0.0.1...0.0.2) | ||
|
||
#### Breaking | ||
|
||
- Run in foreground by default. | ||
- Separate log files and levels for worker and scheduler. | ||
- Decorators for after worker started, before task, and after task callbacks. | ||
|
||
#### Bufix | ||
|
||
- Keep processing tasks after SoftTimeout. | ||
- Scheduler should sleep until scheduled time. | ||
|
||
## 0.0.1 (2022-08-30) | ||
|
||
- Initial release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
BSD 3-Clause License | ||
|
||
Copyright (c) 2023, WakaTime | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
2. Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
3. Neither the name of the copyright holder nor the names of its | ||
contributors may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.PHONY: all test clean build upload | ||
|
||
all: | ||
@echo 'test run the unit tests with the current default python' | ||
@echo 'clean remove builds at dist/*' | ||
@echo 'build run setup.py dist' | ||
@echo 'upload upload all builds in dist folder to pypi' | ||
@echo 'release publish the current version to pypi' | ||
|
||
test: | ||
@pytest | ||
|
||
release: clean build upload | ||
|
||
clean: | ||
@rm -f dist/* | ||
|
||
build: | ||
@python ./setup.py sdist | ||
|
||
upload: | ||
@twine upload ./dist/* |
Oops, something went wrong.