flyalaska Posted August 30, 2015 Report Posted August 30, 2015 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? Quote
mseiwald Posted August 30, 2015 Report Posted August 30, 2015 Why is it an issue at all? In my VA inactive pilots become active again automatically when they file a PIREP without the need for me to do anything manually. 1 Quote
flyalaska Posted September 1, 2015 Author Report Posted September 1, 2015 I know SmartACARS wont let un active pilots login. Not sure why phpvms is putting them back on un active after I re activate them. Quote
Administrators simpilot Posted September 1, 2015 Administrators Report Posted September 1, 2015 My guess would be that you have the maintenance script running daily and it is putting them back to inactive if they have not filed a pirep yet. Quote
flyalaska Posted September 1, 2015 Author Report Posted September 1, 2015 My guess would be that you have the maintenance script running daily and it is putting them back to inactive if they have not filed a pirep yet. Would that be a setting in the config? Quote
Administrators simpilot Posted September 1, 2015 Administrators Report Posted September 1, 2015 You should have something like these lines in your local.config.php file. # After how long to mark a pilot inactive, in days Config::Set('PILOT_AUTO_RETIRE', true); Config::Set('PILOT_INACTIVE_TIME', 90); Quote
flyalaska Posted September 1, 2015 Author Report Posted September 1, 2015 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) Quote
Administrators simpilot Posted September 2, 2015 Administrators Report Posted September 2, 2015 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. Quote
flyalaska Posted September 2, 2015 Author Report Posted September 2, 2015 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. Quote
Administrators simpilot Posted September 2, 2015 Administrators Report Posted September 2, 2015 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. Quote
TennShadow Posted September 2, 2015 Report Posted September 2, 2015 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. Quote
flyalaska Posted September 3, 2015 Author Report Posted September 3, 2015 Thanks Dave and Keith Quote
flyalaska Posted September 26, 2015 Author Report Posted September 26, 2015 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. Quote
Administrators simpilot Posted September 26, 2015 Administrators Report Posted September 26, 2015 Are you using the cron job or no? What is the setting of 'USE_CRON' in your config file? Quote
flyalaska Posted September 26, 2015 Author Report Posted September 26, 2015 There is no setting for CRON in my config file? Quote
Administrators simpilot Posted September 26, 2015 Administrators Report Posted September 26, 2015 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.