Jump to content

Pilots Automatically Put On Leave after Reactivation


flyalaska

Recommended Posts

I am having issues with pilots who are on leave or inactive. They are wanting to fly again. I reactivate them. Within 24 hours they go back on leave again automatically. Most of the time before the pilot is able to fly again. Is there a way to disable this feature or extend the time after they are re activated?

Link to comment
Share on other sites

  • Administrators

I have mine set to 120 days. The issue is that they cant login to SmarACARS when inactive or on leave. So I manually re activate them. If they dont fly in certain time it puts them back on leave or inactive. ( about 24 hours)

Then you will need to set your auto retire to false.

Link to comment
Share on other sites

  • Administrators

I guess I am lost, if you have the auto retire set to false and they are still being set back to another status you must have something else running that is doing it, or you have multiple instances of the auto retire config lines in your system and the last one that is read is set to true.

Link to comment
Share on other sites

Yeah I figured that. I am more concerned about why is my system putting pilots back on leave if they don't file a flight within 24 after they are re activated.

Unless I misread something above I think this is default behavior if you have auto retire turned on. Mine does the same thing. If a pilot gets reactivated but doesn't fly that day (24 hours) they go back to retired because they are still X amount of days since last PIREP filed.

Link to comment
Share on other sites

  • 4 weeks later...

I am finding more details on this issue. I have my config as

# After how long to mark a pilot inactive, in days

Config::Set('PILOT_AUTO_RETIRE', False);

Config::Set('PILOT_INACTIVE_TIME', 120);

I reactivated a pilot, refreshed the edit pilot page in admin and they are back on inactive within 30 minutes. This can be the way the code is written.

Link to comment
Share on other sites

  • Administrators

Then it must be only in your app.config.php file. It should look like below and can be copied to and edited in your local.config.php file.

/* Whether you have the /admin/maintenance.php script added into cron.
If you do, set this to true. This saves many DB calls since phpVMS will
have to 'fake' a cron-job
*/
Config::Set('USE_CRON', false);

If this is set to false the system will force the commands contained in the bootstrap file which include.

if(Config::Get('PILOT_AUTO_RETIRE') == true)
{
$within_timelimit = CronData::check_hoursdiff('find_retired_pilots', '24');
if($within_timelimit == false)
{
PilotData::findRetiredPilots();
CronData::set_lastupdate('find_retired_pilots');
}
}

So, if the last update in your database updates table is over 24 hours old at any time that any page on the site is visited it will run the auto retire script, which if the pilot has not flown within your allotted time will be then retired.

If you are running the maintenance script then you should set this to true and it will avoid the forced running of the auto scripts, BUT if you are running the maintenance file from a cron job remember that if the pilot has not flown within the allotted time when the script runs they will again be set back to retired.

Realistically, unless you have edited the script all they have to do is submit a PIREP using an acars client and the system will set them back to active on its own.

This is in PIREPS.php when adding a PIREP

# Set them as non-retired
PilotData::setPilotRetired($pilotid, 0);

Also have you verified;

I guess I am lost, if you have the auto retire set to false and they are still being set back to another status you must have something else running that is doing it, or you have multiple instances of the auto retire config lines in your system and the last one that is read is set to true.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...