[chronojump] server scripts to have xsp2 ok always
- From: Xavier de Blas <xaviblas src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [chronojump] server scripts to have xsp2 ok always
- Date: Sun, 16 Aug 2009 12:16:21 +0000 (UTC)
commit e3462df320b6696076dea86d106d40a6543fa1ab
Author: Xavier de Blas <xaviblas gmail com>
Date: Sun Aug 16 14:15:19 2009 +0200
server scripts to have xsp2 ok always
gui minor changes
-add new person doesn't show x on speciallity on start dialogue
-hidden status bar in personNotUpload
.../pina_to_pina-good/ChronojumpServerAlive.cs | 87 ++++++++++++++++++++
.../pina_to_pina-good/chronojumpServerAlive.asmx | 1 +
.../pina_to_pina-good/chronojumpServerAlive.dll | Bin 0 -> 3584 bytes
.../chronojumpServerAliveCSharp.cs | 26 ++++++
.../pina_to_pina-good/chronojump_server_alive.cs | 68 +++++++++++++++
.../pina_to_pina-good/chronojump_server_alive.exe | Bin 0 -> 6656 bytes
.../server_alive/pina_to_pina-good/compile_dll.txt | 1 +
.../server_alive/pina_to_pina-good/compile_exe.txt | 1 +
.../server_alive/pina_to_pina-good/reload_xsp2 | 9 ++
src/gui/person.cs | 3 +
10 files changed, 196 insertions(+), 0 deletions(-)
---
diff --git a/chronojump_server/server_alive/pina_to_pina-good/ChronojumpServerAlive.cs b/chronojump_server/server_alive/pina_to_pina-good/ChronojumpServerAlive.cs
new file mode 100644
index 0000000..c447e8c
--- /dev/null
+++ b/chronojump_server/server_alive/pina_to_pina-good/ChronojumpServerAlive.cs
@@ -0,0 +1,87 @@
+// ------------------------------------------------------------------------------
+// <autogenerated>
+// This code was generated by a tool.
+// Mono Runtime Version: 2.0.50727.42
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </autogenerated>
+// ------------------------------------------------------------------------------
+
+
+
+/// <remarks/>
+/// <remarks>
+///ChronojumpServerAlive
+///</remarks>
+[System.Web.Services.WebServiceBinding(Name="ChronojumpServerAliveSoap", Namespace="http://localhost:8080/")]
+[System.Diagnostics.DebuggerStepThroughAttribute()]
+[System.ComponentModel.DesignerCategoryAttribute("code")]
+public class ChronojumpServerAlive : System.Web.Services.Protocols.SoapHttpClientProtocol {
+
+ private System.Threading.SendOrPostCallback PingAliveOperationCompleted;
+
+ public ChronojumpServerAlive() {
+ this.Url = "http://localhost:8080/chronojumpServerAlive.asmx";
+ }
+
+ private event PingAliveCompletedEventHandler PingAliveCompleted;
+
+ /// <remarks>
+///PingAlive
+///</remarks>
+ [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://localhost:8080/PingAlive", RequestNamespace="http://localhost:8080/", ResponseNamespace="http://localhost:8080/", ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped, Use=System.Web.Services.Description.SoapBindingUse.Literal)]
+ public string PingAlive(string str) {
+ object[] results = this.Invoke("PingAlive", new object[] {
+ str});
+ return ((string)(results[0]));
+ }
+
+ public System.IAsyncResult BeginPingAlive(string str, System.AsyncCallback callback, object asyncState) {
+ return this.BeginInvoke("PingAlive", new object[] {
+ str}, callback, asyncState);
+ }
+
+ public string EndPingAlive(System.IAsyncResult asyncResult) {
+ object[] results = this.EndInvoke(asyncResult);
+ return ((string)(results[0]));
+ }
+
+ public void PingAliveAsync(string str) {
+ this.PingAliveAsync(str, null);
+ }
+
+ public void PingAliveAsync(string str, object userState) {
+ if ((this.PingAliveOperationCompleted == null)) {
+ this.PingAliveOperationCompleted = new System.Threading.SendOrPostCallback(this.OnPingAliveCompleted);
+ }
+ this.InvokeAsync("PingAlive", new object[] {
+ str}, this.PingAliveOperationCompleted, userState);
+ }
+
+ private void OnPingAliveCompleted(object arg) {
+ if ((this.PingAliveCompleted != null)) {
+ System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg));
+ this.PingAliveCompleted(this, new PingAliveCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState));
+ }
+ }
+}
+
+public class PingAliveCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs {
+
+ private object[] results;
+
+ internal PingAliveCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
+ base(exception, cancelled, userState) {
+ this.results = results;
+ }
+
+ public string Result {
+ get {
+ this.RaiseExceptionIfNecessary();
+ return ((string)(this.results[0]));
+ }
+ }
+}
+
+public delegate void PingAliveCompletedEventHandler(object sender, PingAliveCompletedEventArgs args);
diff --git a/chronojump_server/server_alive/pina_to_pina-good/chronojumpServerAlive.asmx b/chronojump_server/server_alive/pina_to_pina-good/chronojumpServerAlive.asmx
new file mode 100755
index 0000000..829b30b
--- /dev/null
+++ b/chronojump_server/server_alive/pina_to_pina-good/chronojumpServerAlive.asmx
@@ -0,0 +1 @@
+<%@ WebService Language="C#" Class="ChronojumpServerAlive" %>
diff --git a/chronojump_server/server_alive/pina_to_pina-good/chronojumpServerAlive.dll b/chronojump_server/server_alive/pina_to_pina-good/chronojumpServerAlive.dll
new file mode 100755
index 0000000..f512b33
Binary files /dev/null and b/chronojump_server/server_alive/pina_to_pina-good/chronojumpServerAlive.dll differ
diff --git a/chronojump_server/server_alive/pina_to_pina-good/chronojumpServerAliveCSharp.cs b/chronojump_server/server_alive/pina_to_pina-good/chronojumpServerAliveCSharp.cs
new file mode 100755
index 0000000..e0c2c17
--- /dev/null
+++ b/chronojump_server/server_alive/pina_to_pina-good/chronojumpServerAliveCSharp.cs
@@ -0,0 +1,26 @@
+//llibre mono (notebook) pag 206
+
+using System; //for environment
+using System.IO;
+using System.Web.Services;
+//using System.Web;
+using System.Web;
+
+using System.Net; //getIP stuff
+
+[WebService(Namespace="http://localhost:8080/", //work to connect to corall development from client (from browser works only when online)
+//[WebService(Namespace="http://80.32.81.197:8080/", //works to connect with pinux xen from client (from browser don't works) WORKS FROM CLIENT
+//[WebService(Namespace="http://server.chronojump.org:8080/", //works to connect with pinux xen from client (from browser don't works) WORKS FROM CLIENT (important: needed the last '/')
+//[WebService(Namespace="http://server.chronojump.org/", //works to connect with pinux xen from client (from browser don't works) WORKS FROM CLIENT (important: needed the last '/')
+ Description="ChronojumpServerAlive")]
+[Serializable]
+public class ChronojumpServerAlive {
+
+ [WebMethod(Description="PingAlive")]
+ public string PingAlive(string str)
+ {
+ Console.WriteLine("PingAlive string: " + str);
+
+ return "OK";
+ }
+}
diff --git a/chronojump_server/server_alive/pina_to_pina-good/chronojump_server_alive.cs b/chronojump_server/server_alive/pina_to_pina-good/chronojump_server_alive.cs
new file mode 100644
index 0000000..460be94
--- /dev/null
+++ b/chronojump_server/server_alive/pina_to_pina-good/chronojump_server_alive.cs
@@ -0,0 +1,68 @@
+/*
+ * This file is part of ChronoJump
+ *
+ * Chronojump is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Chronojump is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Xavier de Blas:
+ */
+
+/*
+ this will be on server run every 20' to see of server if xsp2 is up
+ (not only if the process is ok, we want to know if it really works)
+ print also data to a file to know what's happening with xsp2
+ and kill...wait...execute xsp2 if died
+ */
+
+using System;
+using System.IO; //"File" things
+using System.Diagnostics; //Process
+using System.Text; //StringBuilder
+
+public class ChronoJumpServerAlive
+{
+ public static void Main(string [] args)
+ {
+ TextWriter writer;
+ writer = File.AppendText("log.txt");
+ string result = "";
+
+ try {
+ ChronojumpServerAlive myServer = new ChronojumpServerAlive();
+ result = myServer.PingAlive(DateParse(DateTime.Now.ToString()));
+ }
+ catch {
+ result = "--- restarting " + DateParse(DateTime.Now.ToString()) + " ---";
+
+ string xsp2ReloadMark = "xsp2_need_to_reload";
+ if(!File.Exists(xsp2ReloadMark))
+ File.CreateText(xsp2ReloadMark);
+ }
+
+ writer.WriteLine(result);
+ writer.Flush();
+ writer.Close();
+ }
+
+ private static string DateParse(string myDate) {
+ StringBuilder myStringBuilder = new StringBuilder(myDate);
+ //for not having problems with the directories:
+ myStringBuilder.Replace(" ", "_"); //replace the ' ' (date-hour separator) for '_'
+ myStringBuilder.Replace("/", "-"); //replace the '/' (date separator) for '-'
+ myStringBuilder.Replace(":", "-"); //replace the ':' (hour separator) for '-'
+ myStringBuilder.Replace(".", ""); //delete the '.' in a.m.: 13-01-2009_02-05-43_a.m.
+
+ return myStringBuilder.ToString();
+ }
+}
diff --git a/chronojump_server/server_alive/pina_to_pina-good/chronojump_server_alive.exe b/chronojump_server/server_alive/pina_to_pina-good/chronojump_server_alive.exe
new file mode 100755
index 0000000..1aef745
Binary files /dev/null and b/chronojump_server/server_alive/pina_to_pina-good/chronojump_server_alive.exe differ
diff --git a/chronojump_server/server_alive/pina_to_pina-good/compile_dll.txt b/chronojump_server/server_alive/pina_to_pina-good/compile_dll.txt
new file mode 100644
index 0000000..cf214bb
--- /dev/null
+++ b/chronojump_server/server_alive/pina_to_pina-good/compile_dll.txt
@@ -0,0 +1 @@
+gmcs2 -t:library -out:chronojumpServerAlive.dll -r:System.Data -r:System.Web.Services -r:Mono.Posix chronojumpServerAliveCSharp.cs
diff --git a/chronojump_server/server_alive/pina_to_pina-good/compile_exe.txt b/chronojump_server/server_alive/pina_to_pina-good/compile_exe.txt
new file mode 100644
index 0000000..880738a
--- /dev/null
+++ b/chronojump_server/server_alive/pina_to_pina-good/compile_exe.txt
@@ -0,0 +1 @@
+gmcs2 chronojump_server_alive.cs ChronojumpServerAlive.cs -r:System.Web.Services -out:chronojump_server_alive.exe
diff --git a/chronojump_server/server_alive/pina_to_pina-good/reload_xsp2 b/chronojump_server/server_alive/pina_to_pina-good/reload_xsp2
new file mode 100755
index 0000000..6b66af6
--- /dev/null
+++ b/chronojump_server/server_alive/pina_to_pina-good/reload_xsp2
@@ -0,0 +1,9 @@
+#!/bin/sh
+if [ -f testfile ]
+then
+ killall mono
+ sleep 3
+ xsp2 --root /var/www/mono/ --nonstop &
+ rm xsp2_need_to_reload
+fi
+
diff --git a/src/gui/person.cs b/src/gui/person.cs
index 3896c3e..2c6be99 100644
--- a/src/gui/person.cs
+++ b/src/gui/person.cs
@@ -624,6 +624,8 @@ public class PersonNotUploadWindow : PersonsRecuperateFromOtherSessionWindow
hbox_search_filter_hide.Hide();
//this class doesn't use button recuperate
button_recuperate.Hide();
+ //this class doesn't use status bar
+ statusbar1.Hide();
fakeButtonDone = new Gtk.Button();
@@ -858,6 +860,7 @@ public class PersonAddModifyWindow
createComboSports();
createComboSpeciallities(-1);
+ image_speciallity.Hide();
label_speciallity.Hide();
combo_speciallities.Hide();
createComboLevels();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]