synolia / syliusschedulercommandplugin Goto Github PK
View Code? Open in Web Editor NEWSchedule Symfony Commands in your Sylius
License: MIT License
Schedule Symfony Commands in your Sylius
License: MIT License
Is your feature request related to a problem? Please describe.
The CronExpressionHumanizer do not use the 3rd argument of translate
to allow 24 hours format to be used.
Describe the solution you'd like
Maybe use an option to pass true/false.
Is your feature request related to a problem? Please describe.
The configurable timeout should be a positive integer only in the admin form.
Describe the solution you'd like
Add a Symfony constraint to disallow "-n" numbers.
Describe alternatives you've considered
N/A
Additional context
A customer I had with access admin to its shop has modified by mistake (mouse scroll on page scroll) the timeout and it was set to -3. Symony process crashed for days because the timeout value was invalid (obviously).
Is your feature request related to a problem? Please describe.
When I install the project, with the naming strategy doctrine.orm.naming_strategy.underscore
the fields are not found due to other case being used than underscore.
Unknown column 's0_.cron_expression' in 'field list'
Describe the solution you'd like
I'm not sure what the fix should be but a note about this would be great.
Is your feature request related to a problem? Please describe.
I have two websites hosted on the same server. I can't run twho schedulers
Describe the solution you'd like
In this file vendor/synolia/sylius-scheduler-command-plugin/src/Command/SynoliaSchedulerRunCommand.php
replace
if (!$this->lock() {
by
if (!$this->lock(realpath(dirname(FILE)))) {
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
I would realy love to see values in the human_readable_expression (Humanized expression) column also being translated.
Describe the solution you'd like
Use another library, like e.g. https://github.com/lorisleiva/cron-translator in ScheduledCommandHumanReadableExpressionType as that supports translations, I could make a PR for you to implement this and I could make a PR on that library so it also supports Dutch (nl).
Describe the bug
If shceduled command not fount and run at last, error code is not saved on database.
To Reproduce
Steps to reproduce the behavior:
bin/console synolia:scheduler-run
Expected behavior
The sheduled command should have -1
as last return code
Additional context
In the case on last command, there is no flush()
instruction.
This step can be remove since symfony/recipes-contrib#1121 is merged.
Describe the bug
when I click on the log tail button, nothing happens. In console a .js script is missing. It seems related to the themes but there's no documentation about usage.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
'Live view' of log file working.
Screenshots
GET http://www.foo.localhost/_themes/foo/bar/bundles/synoliasyliusschedulercommandplugin/column/index.js net::ERR_ABORTED 404
Hi,
I would like to purge the history however when I try to run the symfony command I get this message as a response.
php bin/console synolia:scheduler:purge-history --all
**There are no commands defined in the "synolia:scheduler" namespace.
Did you mean this?
synolia**
Do I have to activate something in the configuration?
I'm on Sylius 1.10.7
Thanks
Composer infos
sylius/calendar v0.3.0 Date handling for PHP applications.
sylius/fixtures-bundle v1.7.0 Configurable fixtures for Symfony applications.
sylius/grid-bundle v1.10.2 Amazing grids with support of filters and custom fields integrated into Symfony.
sylius/mailer-bundle v1.6.0 Mailers and e-mail template management for Symfony projects.
sylius/paypal-plugin v1.4.1 PayPal plugin for Sylius.
sylius/registry v1.6.0 Services registry.
sylius/resource-bundle v1.8.4 Resource component for Sylius.
sylius/sylius v1.11.4 E-Commerce platform for PHP, based on Symfony framework.
sylius/theme-bundle v2.2.0 Themes management for Symfony projects.
synolia/sylius-scheduler-command-plugin v3.1.0 Scheduler Command Plugin.
Describe the bug
Try to click on "New"
To Reproduce
Steps to reproduce the behavior:
Screenshots
ErrorException:
Warning: Attempt to read property "namespaces" on null
at C:\wamp\www\sylius\Sylius-Standard\vendor\synolia\sylius-scheduler-command-plugin\src\Parser\CommandParser.php:63
Additional context
Add any other context about the problem here.
Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
With the stable release of the Symfony Scheduler (exp. since 6.3) component right around the corner, we should keep into account that soon we will be able to use that to handle scheduling and handling of commands.
Therefore, it might be wise to already start thinking about this, when changing or adding current features to this project.
I think the Scheduler component will be able to remove a lot of code from this repo, and therefore would be the clear better choice in the future.
As a quick example, the logic used to check if a command should be scheduled to run, and when, can be condensed into this single line:
(new Schedule())->add(RecurringMessage::cron($command->getCronExpression(), new CommandMessage($command)));
If you would like any help on making this happen, let me know, and i'd love to help out with the transition
Allow to add Scheduled Command fixtures.
Currently we are retrieving the list of commands that can be executed in console by launching the console and parsing the results.
This code is in
It is possible to do it more simply, by use
https://github.com/symfony/console/blob/4e102e4de39852a1dcd3b2169d263b88afee7fff/Application.php#L739
Currently, we are able to put ANY file on the server as "log file" with relative paths. That means, we can access
Steps to reproduce the behavior:
Expected behavior
User can't perform read/write operations on files other than logs.
I have a long running command scheduled, which it itself runs a set of other console commands (runs a command for each channel and locale combination) and it regularly hits the 60 second time out and doesn't finish running.
I'm thinking it should be possible to pass a time out in seconds from the admin through to setTimeout()
on the process, which can also take null to disable, however the Symfony docs say that for longer tasks you have to also check the timeout manually so not sure how practical that is. I also realise there might be issues if the timeout is longer than the interval between two runs of the command.
Describe the bug
I have set a task that would normally execute every hours: 0 * * * *
Except it runs every minutes if I look at the history of scheduled commands ?
To Reproduce
Setup a task 0 * * * *
and go to admin/scheduled-commands/
Expected behavior
Run every hours at m + 0.
Additional context
N/A
I'm trying to execute a cmd (sylius:import) but I get this error
Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.2.0". You are running 8.1.29. PHP Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.2.0". You are running 8.1.29. in /PATH_TO_PROJECT/vendor/composer/platform_check.php on line 24
I'm using a platform with several PHP installed but the default one is 8.2
When I'm launching the same command in the crontab, I haven't the error
The command :
php8.2 /PATH_TO_PROJECT/bin/console sylius:import custom_customers /ABSOLUTE_PATH/clients.csv --format=csv > /PATH_TO_PROJECT/var/log/cron/import_client.log
Is your feature request related to a problem? Please describe.
Hello, all in the title, do you plan to support Sylius 1.11 anytime soon ?
I'm getting slow queries report from Mysql because of the lack of an index for the "state" field.
The query that is reported is the following:
SELECT t0.id AS id_1, t0.name AS name_2, t0.command AS command_3, t0.arguments AS arguments_4, t0.executed_at AS executed_at_5, t0.last_return_code AS last_return_code_6, t0.log_file AS log_file_7, t0.command_end_time AS command_end_time_8, t0.created_at AS created_at_9, t0.state AS state_10, t0.timeout AS timeout_11, t0.idle_timeout AS idle_timeout_12, t0.owner_id AS owner_id_13 FROM synolia_scheduled_commands t0 WHERE t0.state = 'waiting';
Thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.