neighborhoods / kojo
Neighborhoods Kōjō is a distributed task manager.
Installs: 19 127
Dependents: 2
Suggesters: 0
Security: 0
Stars: 13
Watchers: 28
Forks: 5
Open Issues: 12
Requires
- php: ^7.2|^8.0
- ext-pcntl: *
- doctrine/dbal: ^2.7
- dragonmantank/cron-expression: ^2.0
- monolog/monolog: ^1.24.0
- symfony/cache: 4.4.*
- symfony/config: 4.4.*
- symfony/console: 4.4.*
- symfony/dependency-injection: 4.4.*
- symfony/expression-language: 4.4.*
- symfony/filesystem: 4.4.*
- symfony/finder: 4.4.*
- symfony/yaml: 4.4.*
Requires (Dev)
- phpunit/dbunit: ^4.0
- phpunit/phpunit: ^7.0
- 6.x-dev
- 5.x-dev
- 5.5.0
- 5.4.1
- 5.4.0
- 5.3.0
- 5.2.0
- 5.1.1
- 5.1.0
- 5.0.0
- 4.x-dev
- 4.18.0
- 4.17.1
- 4.17.0
- 4.16.0
- 4.15.0
- 4.14.2
- 4.14.1
- 4.14.0
- 4.13.2
- 4.13.1
- 4.13.0
- 4.12.0
- 4.11.1
- 4.11.0
- 4.10.1
- 4.10.0
- 4.9.0
- 4.8.3
- 4.8.2
- 4.8.1
- 4.8.0
- 4.7.0
- 4.6.0
- 4.5.0
- 4.4.0
- 4.3.2
- 4.3.1
- 4.3.0
- 4.2.0
- 4.1.0
- 4.0.0
- 3.x-dev
- 3.3.3
- 3.3.2
- 3.3.1
- 3.3.0
- 3.2.0
- 3.1.0
- 3.0.1
- 3.0.0
- 2.x-dev
- 2.0.0
- 1.x-dev
- 1.0.2
- 1.0.1
- 1.0.0
- dev-KOJO-242-process-group-awareness
- dev-KOJO-243-orphaned-process-detection-logic
- dev-KOJO-244-detect-userspace-open-pdo-transactions
- dev-KOJO-237-fix-php8-release
- dev-KOJO-235-php8-release
- dev-KOJO-201-api-aware-interfaces
- dev-KOJO-224-configurable-disable-job-type-logging-5x
- dev-KOJO-224-configurable-disabled-job-type-logging
- dev-feature/KOJO-210
- dev-KOJO-217-usage-patterns-guide
- dev-KOJO-203-naively-truncate-log-messages
- dev-KOJO-185-expose-user-defined-resource-mutexing-api
- dev-naively-truncate-log-messages
- dev-hotfix-stop-spawning-jsclp-process-4
- dev-hotfix-stop-spawning-jsclp-process-5
- dev-master
- dev-hotfix-stop-spawning-jsclp-process
- dev-feature/KOJO-196
- dev-KOJO-150-emit-messages-for-job-state-changes
- dev-KOJO-153-write-to-job-state-changelog
- dev-KOJO-192-add-flag-for-job-state-change-logging
- dev-feature/KOJO-191
- dev-KOJO-173-auto-migration-logic
- dev-feature/KOJO-186
- dev-KOJO-185-expose-mutexing-api-to-userspace
- dev-KOJO-188-guard-against-pdo-with-non-exception-errmode
- dev-update-readme
- dev-feature/KOJO-179-mucha
- dev-feature/KOJO-179-master-master
- dev-feature/KOJO-179-master
- dev-feature/KOJO-179
- dev-KOJO-182-audit-dependencies
- dev-KOJO-178-guard-against-full-process-pool-when-polling-singletons
- dev-KOJO-180-clean-up-root-process-pool-after-jsclp-exit
- dev-KOJO-167-169-175-update-outdated-symfony-component-dependencies
- dev-feature/KOJO-166-5.x
- dev-feature/KOJO-166
- dev-KOJO-96-no-more-exception-crash-looping
- dev-feature/KOJO-162
- dev-feature/KOJO-157
- dev-KOJO-154-include-metadata-in-job-state-change-model
- dev-KOJO-149-state-transition-change-migration
- dev-feature/KOJO-136
- dev-KOJO-151-state-transition-change-model-code
- dev-KOJO-143-state-transition-logger-process-framework
- dev-feature/KOJO-137
- dev-feature/KOJO-148
- dev-hotfix-watchdog-to-use-one-named-connection
- dev-KOJO-79-more-robust-redis-message-processing
- dev-KOJO-127-state-transition-logger-design
- dev-feature/KOJO-112-api
- dev-client-defined-signal-delivery
- dev-update-codeowners
- dev-feature/memory-defensiveness
- dev-feature/KOJO-99
- dev-KOJO-82-add-error-get-last-to-shutdown-event
- dev-define-database-port
- dev-KOJO-73-gracefully-handle-disabled-statically-scheduled-job-types
- dev-KOJO-85-explicitly-use-utc-for-cron
- dev-KOJO-86-improve-job-type-registrar-to-register-multiple-job-types-in-one-runtime
- dev-KOJO-79-fix-non-json-messages
- dev-dod/improve-event-visibility
- dev-fix-reschedule-jobs-collection-load-race-condition
- dev-remove-remaining-kojospace-notices
- dev-fix-db-setup-teardown-commands
- dev-feature/notification-api
- dev-KOJO-42-handle-doctrine-unsupported-type-error
- dev-feature/KOJO-30
- dev-KOJO-65-expose-new-relic-api-in-userspace
- dev-KOJO-60-remove-pylon-exception-dependency
- dev-KOJO-59-expose-number-times-retried
- dev-KOJO-42-handle-doctrine-unsupported-type-error-during-installation
- dev-KOJO-57-store-date-time-from-worker-retry-request
- dev-KOJO-21-cleaning-up-composer-json
- dev-KOJO-49-expose-job-id-in-userspace
- dev-feature/KOJO-36
- dev-feature/KOJO-28
This package is auto-updated.
Last update: 2024-12-10 02:00:21 UTC
README
工場
A distributed task manager.
Kōjō
is a collection of the following components:
- Distributed task management.
- Distributed, cooperative, process-aware semaphores and mutexes.
- Static cron scheduling.
- Multi-process model.
- Distributed IPC.
Trying out Kōjō
Real-world use cases for Kōjō and instructions for getting Kōjō up and running in your project can be found at KojoFitness.
Debugging Kōjō
XDebug version greater than xdebug-2.7.0alpha1
is required when trying to debug Kōjō. This version of XDebug resolves issues (https://bugs.xdebug.org/938) caused by the way the Kōjō forks using pcntl
.
If you are using PhpStorm and you have more concurrent Kōjō jobs running than the Max. simultaneous connections
defined for your XDebug listener, Kōjō will appear to hang. To avoid this, increase your Max. simultaneous connections
to the max value of 20
in PhpStorm's preferences under Languages & Frameworks
> PHP
> Debug
, External connections
section.
Kōjō appears to be hanging during local development?
- Stop all local containers and rebuild them
- Run
ps -auxf
to see if any processes are still running Kōjō with a title likeneighborhoods-kojo: /server[8]/root[22]/job[30]
- If yes run
pkill -9 -f kojo
to SIG_KILL all the processes containing the wordkojo
- If yes run
- Run
docker-compose exec redis redis-cli monitor
to see if Kōjō is creating any activity in redis.- If nothing is streaming by like
"GET" "/neighborhoods/kojo/area_manager/job_state_changelog_processor.lock"
messages then something else is blocking the execution of Kōjō internals. This is typically due to a debugger.
- If nothing is streaming by like
- Turn off the debugger. Sometimes this will mess with Kojo
- Check your version of XDebug (version before
2.7.0
won't work and2.8.2
has seen some odd behavior. Recommend2.9.2
) - Checkout the debugging logs Troubleshooting common PHP debugging issues - Help | PhpStorm