1b.app
Link copied -

processIssueAutoMove - what is the action in the cron, what does it cost and how to influence its execution time with settings

Good afternoon! please advise
in the minute cron there is such a task processIssueAutoMove , which takes a rather large amount of execution time.
Please tell me how you can influence it and in general what it is responsible for and how you can optimize it in order to minimize the execution time of a minute cron
Original question is available on version: ru

Answers:

Суханіцький Андрій OneBox CORP
OneBox Corp - Інтегратор
Personal license
These are all your settings, like "change the stage depending on the value..", which are triggered once a minute.
How to reduce the time of work - make the settings more correctly, turn on the update once an hour / day, where you don't need to check so often. (I don’t know if the action will really work on a daily / hourly crown, but it will clearly reduce the load, since, for example, processes will need to be processed more than once a minute for 40 seconds, but only once an hour to spend 40 seconds, that is, once an hour cron will run a little longer)
+ The more processes in the statuses where such a check is performed, the longer it works, so remove / replace automation at stages where there will be many processes, where possible - make a change by triggers (for example, if the value is transferred from another process, and the check times per minute is performed in the current one, you can immediately change the status), instead of checking once a minute
15.09.2021, 13:14
Original comment available on version: ru

Unfortunately, Andrew partially misled you. The specified process for users who have the setting "Automatically transfer uncompleted business processes to the next day" transfers tasks to the next day. But how quickly tasks will be transferred depends on their number and bp settings. If tasks are transferred for a long time, there are probably actions that do something while saving processes.
15.09.2021, 13:20
Original comment available on version: ru

Перегиняк Александр
Oneboxconsulting (интегратор)

Sukhanitsky Andrey
Integrator
Client
Integrator CRM wrote:
These are all your settings, like "change the stage depending on the value..", which are triggered once a minute.
How to reduce the time of work - make the settings more correctly, turn on the update once an hour / day, where you don't need to check so often. (I don’t know if the action will really work on a daily / hourly crown, but it will clearly reduce the load, since, for example, processes will need to be processed more than once a minute for 40 seconds, but only once an hour to spend 40 seconds, that is, once an hour cron will run a little longer)
+ The more processes in the statuses where such a check is performed, the longer it works, so remove / replace automation at stages where there will be many processes, where possible - make a change by triggers (for example, if the value is transferred from another process, and the check times per minute is performed in the current one, you can immediately change the status), instead of checking once a minute

Andrey, thanks for the answer, but the recommendation of the anonymous duck turned out to be working
15.09.2021, 16:48
Original comment available on version: ru

Перегиняк Александр
Oneboxconsulting (интегратор)

anonymous duck
OneBox production
Employee wrote:
Unfortunately, Andrew partially misled you. The specified process for users who have the setting "Automatically transfer uncompleted business processes to the next day" transfers tasks to the next day. But how quickly tasks will be transferred depends on their number and bp settings. If tasks are transferred for a long time, there are probably actions that do something while saving processes.

Thanks! helped. though I had to twist a little with requests ... the fact is that this processIssueAutoMove task does not at all take into account whether the contact is deleted or not, whether he is an employee or not, whether he is blocked or not, etc. It turns out that the legs grow from the fact that ... there was an employee, then he quit, he was blocked ... a lot of tasks hung on him and even with a strong desire it will be very problematic to find all the contacts who have this option enabled ... but I found it. ... if anyone needs it - beacon, I will share the sql query)))
By the way, the cron time is now less than 60 seconds))))
15.09.2021, 16:51
Original comment available on version: ru


Pereginyak Alexander
FOP Peregynyak O.P.
Client
Oneboxconsulting (integrator) wrote:
it has a lot of tasks

he probably had some tasks that were useless for business, in my opinion this should not be

Pereginyak Alexander
FOP Peregynyak O.P.
Client
Oneboxconsulting (integrator) wrote:
if anyone needs it - beacon, I will share the sql query

for such things you can fly off the technical support
15.09.2021, 17:06
Original comment available on version: ru

Перегиняк Александр
Oneboxconsulting (интегратор)

anonymous duck
OneBox production
Employee wrote:
for such things you can fly off the technical support

do you know how i did it? note, I did not write that I used php my admin or something else))). Well, okay, let's consider the functionality of the report designer some other time)))
and yes, I think even for the rash use of actions in business processes, you can also deprive those of support, because they can shake a server in such a way that it won’t seem enough. compared to this, using sql queries on a table would be sheer pampering.
15.09.2021, 17:31
Original comment available on version: ru

There are not so many options for making a request to the database.

Pereginyak Alexander
FOP Peregynyak O.P.
Client
Oneboxconsulting (integrator) wrote:
Well, okay, we’ll consider the functionality of the report designer some other time

I coded it for you, I think there is no need to tell how it works)
In general, I mean that if you already have access to the database, then you don’t need to “push” others to climb there, since in most cases this can lead to disastrous consequences, since one request can make a mistake.
15.09.2021, 17:43
Original comment available on version: ru

Перегиняк Александр
Oneboxconsulting (интегратор)

anonymous duck
OneBox production
Employee wrote:
There are not so many options for making a request to the database.

Pereginyak Alexander
FOP Peregynyak O.P.
Client
Oneboxconsulting (integrator) wrote:
Well, okay, we’ll consider the functionality of the report designer some other time

I coded it for you, I think there is no need to tell how it works)
In general, I mean that if you already have access to the database, then you don’t need to “push” others to climb there, since in most cases this can lead to disastrous consequences, since one request can make a mistake.

ok, I won't do it again. only if they ask me, although you know ... I think you are exaggerating about the danger of accessing the database through the constructor. Look, even in the most unfortunate Presta there is access to the database from the admin panel .. and people seem to use it .... but whatever you say, you are the owners of the product and you decide whether the game is worth the candle or not. as for me, the presence of such a convenient data access tool will help increase interest in the product. I, as a person, this is the past, I can even guarantee this)))
15.09.2021, 18:01
Original comment available on version: ru

It seems to me that people should be allowed to climb several levels higher than writing queries in the database. Being able to write database queries is certainly cool, but this is a very specific skill that 0.01% of the people on the planet own. But putting a checkmark somewhere (roughly) or choosing a field is already a little simpler. The point is that writing code or queries to the database is cool, but it’s even cooler not to stoop when this skill is needed to set up any system. In the same Bitrix, for example, you can generally start php code from the admin panel, but this does not mean that it is good and all the more useful (and it’s not at all a fact that the scripts that you write there are better than the Bitrix code itself or the modules that you can connect there). This is needed by one percent of people who know the same php. But most likely, if you are running your online store / setting up the system yourself, you start to get into the code - most likely in life you are doing something wrong. Those. it’s like you can’t code normally, but you don’t run a business either (you spend time writing some code in the admin panel).
An analogy can be made with all your favorite cars. Of course, it’s good to know how the engine works, to be able to disassemble it - but why, if you are not an auto mechanic, spend 2 days to disassemble and repair the engine if you can drive it away for a hundred and then pick it up, having worked, for example, for the same time and beat off the repair costs and earn more . Everyone should do their own thing, if you start doing several at once - most likely, none of them will work out perfectly. In short, do not teach users to climb "under the hood" of boxing)
16.09.2021, 12:36
Original comment available on version: ru

Перегиняк Александр
Oneboxconsulting (интегратор)

anonymous duck
OneBox production
Employee wrote:
It seems to me that people should be allowed to climb several levels higher than writing queries in the database. Being able to write database queries is certainly cool, but this is a very specific skill that 0.01% of the people on the planet own. But putting a checkmark somewhere (roughly) or choosing a field is already a little simpler. The point is that writing code or queries to the database is cool, but it’s even cooler not to stoop when this skill is needed to set up any system. In the same Bitrix, for example, you can generally start php code from the admin panel, but this does not mean that it is good and all the more useful (and it’s not at all a fact that the scripts that you write there are better than the Bitrix code itself or the modules that you can connect there). This is needed by one percent of people who know the same php. But most likely, if you are running your online store / setting up the system yourself, you start to get into the code - most likely in life you are doing something wrong. Those. it’s like you can’t code normally, but you don’t run a business either (you spend time writing some code in the admin panel).
An analogy can be made with all your favorite cars. Of course, it’s good to know how the engine works, to be able to disassemble it - but why, if you are not an auto mechanic, spend 2 days to disassemble and repair the engine if you can drive it away for a hundred and then pick it up, having worked, for example, for the same time and beat off the repair costs and earn more . Everyone should do their own thing, if you start doing several at once - most likely, none of them will work out perfectly. In short, do not teach users to climb "under the hood" of boxing)

you speak correctly, but as you understand, there is always and everywhere one BUT, sometimes not even one ...
for me, as an analyst in the past, rule number 1 of the accounting system is that everything that is entered into the system must be withdrawn from it for the possibility of accounting and analysis, and it is very desirable to do this quickly
1. at the moment, boxing, with its functionality, does not allow this for the reason that either there is no functionality, or it is terribly inconvenient, incomprehensible, confusing, and if you order the development of your report, then during the implementation the need for data will either disappear or require new clarifications. in general, it is worth submitting the necessary report, as the customer asks to add something new. each time contacting you for this means endlessly abusing the patience of the customer and his finances. sooner or later it will all end
2. access to data should be relatively easy ... what you described about the checkboxes is true, but the question is how to do it so as not to drown in these checkboxes? in reports it is unlikely to work. I'm sure it won't even work.
3. at the expense of report designers ... I don’t know if you got acquainted with the functionality of the query designer in 1s and the data composition system. If not, we can watch together. As for me, I must admit that it is implemented quite conveniently there. those. you can write a query without using SQL (exactly what you are talking about - you poke, drag, establish links and as a result you get any data in any form). The idea itself is not new, the same constructors are in other software for working with databases
4. the fact that I write requests is not because I am such a super coder and I do it for fun ... rather, on the contrary, because of hopelessness, because I understand that it will take XXX hours to cheat a functional similar to paragraph 3 programming well, or you need to find some software and implement it in boxing. anyway it's a big amount of money and I don't know any clients who would be willing to pay for it
5. if you are interested, we can think about making a separate application for boxing - a query builder, in which we can implement exactly what you write about (the ability to get data from the necessary tables without using sql programming). I am sure that such an application will gain popularity.
16.09.2021, 21:49
Original comment available on version: ru

I heard and understood you. I'm interested in working on what's mentioned in point 5. Will it be convenient for you if I write to you, for example, in a telegram to the phone number indicated on the forum?
17.09.2021, 10:38
Original comment available on version: ru

Перегиняк Александр
Oneboxconsulting (интегратор)

anonymous duck
OneBox production
Employee wrote:
I heard and understood you. I'm interested in working on what's mentioned in point 5. Will it be convenient for you if I write to you, for example, in a telegram to the phone number indicated on the forum?

yes, sure
17.09.2021, 16:43
Original comment available on version: ru

Please join the conversation. If you have something to say - please write a comment. You will need a mobile phone and an SMS code for identification to enter. Log in and comment