Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Неправильное поведение при повторном вызове table_sync:work

Open
#11 0 comments 3 reactions 1 assignee View on GitHub

@evgeek is already working on this.

Since May 26, 2023.

Assessment

This issue has not been assessed yet.

Description

Если у вас в фоне запущен воркер table_sync:work, и вы повторно вызовете table_sync:work, то увидите ошибку, что воркер уже запущен. Но тогда сработает деструктор:
https://github.com/umbrellio/php-table-sync/blob/4e415f67df9be49273508880148691af17663324/src/Integration/Laravel/Console/Commands/WorkCommand.php#L15-L18

Он удалит pid и третий вызов table_sync:work позволит создать нового воркера, а за первым уже никак нельзя будет следить.

Предлагаю убрать в деструкторе удаление пида. Он должен удаляться только в конце handle() в finally.

Также, возможно, стоит задуматься о том, чтобы сделать поддержку работы нескольких воркеров.

Dominant language
PHP
Stars
5
Forks
1
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.